<title>推荐的好友</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(path)/assets/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="#(path)/assets/js/jquery.tmpl.min.js"></script> 
#@checkToken()

<style>  
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	*{margin:0;padding:0;}
	li{list-style-type:none;}
	select,input{-webkit-appearance:none;border:0px;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);   
	}
	#dateconfirm{background:#fa3048;color:#FFF;}
	#datetitle{background:#fa3048;color:#FFF;}
	#datecancle{color:#FFF}
</style>
<body bgcolor="#fff" style="margin:0px;">
	<div align="center" style="width:100%;height:50px;border-bottom:1px solid #f0f0f0">
		<div align="center" style="background:#FFF;width:90%;height:50px;">
			<div align="center" style="width:100%;height:50px;background:#FFF;line-height:50px;">
				<div style="overflow:hidden">
					<div align="center" style="float:left;width:30%">
						<div><a style="font-size:16px;color:#fa3048">推荐用户</a></div>
					</div>
					<div align="center" style="float:left;width:40%">
						<div><a style="font-size:16px;color:#fa3048">推荐时间</a></div>
					</div>
					<div align="center" style="float:left;width:30%">
						<div><a style="font-size:16px;color:#fa3048">赚取收益</a></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="alllist" align="center" style="padding-bottom:20px;"></div>
	<div id="showlists"></div>	
	
	
	
	
	<div style="position:fixed;bottom:0px;width:100%;height:50px;background:#FFF;border-top:1px solid #bbb">
		<div style="float:left;width:47%;line-height:50px;margin-left:3%;">收益总额：<span id="total"></span></div>
		<div onclick="window.location.href='/app/page/personal-refereeLink'" align="right" style="float:right;width:47%;line-height:50px;margin-right:3%;color:#fa3048">点击立即邀请好友</div>
	</div>
	
	
	

<script id="demo" type="text/x-jquery-tmpl">
	<div align="center" style="width:100%;height:40px;border-bottom:1px solid #f0f0f0">
		<div align="center" style="background:#FFF;width:90%;height:40px;">
			<div align="center" style="width:100%;height:40px;background:#FFF;line-height:40px;">
				<div style="overflow:hidden">
					<div align="center" style="float:left;width:20%">
						<span style="font-size:12px;color:#626262">${mobile}</span>
					</div>
					<div align="center" style="float:left;width:60%">
						<span style="font-size:12px;color:#626262">${create_time}</span>
					</div>
					<div align="center" style="float:left;width:20%">
						<span style="font-size:12px;color:#fa3048">${amount} 元</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</script>

<script type="text/javascript" src="/assets/dropload/dropload.min.js"></script>
<link rel="stylesheet" href="/assets/dropload/dropload.css">
<script>
var page = 0;
$('#alllist').dropload({
	scrollArea : window,
	loadDownFn : function(me){
		page++; 
		var url = "/user/friends?token=#(session.token??)&size=10&page="+page;
		console.log(page);
		$.getJSON(url, function(datalist) {
			var total = datalist.data.total;
			$("#total").html(total);
			$.each(datalist.data.page.list, function(i, item){ 
				console.log(datalist);
				var mobile = item.mobile.substring(0, 3) + "****" + item.mobile.substring(7, 11);
				var invests = {mobile:mobile,create_time:item.create_time,amount:item.amount};
				$("#demo").tmpl(invests).appendTo('#alllist');
			});
			$(".dropload-down").css("height","0px"); 
			if(!datalist.data.page.lastPage){
				me.resetload();	
			}
		});
	}
});			
</script> 



</body>